<?php 
   include("funciones.php");
$con=conexion();

if($con)
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"lang="es" xml:lang="es">

<head>
<title>
Inventario enConfianza
</title>


        <link rel="stylesheet" type="text/css" href="plantilla.css" media="all"/>
        <link rel="stylesheet" type="text/css" href="muffin.css"/> 
		<link rel="stylesheet" href="tableorderer.css" type="text/css" />
        <script type="text/javascript" src="scripts.js" language="javascript"></script>
		<script src="scriptaculous/lib/prototype.js" type="text/javascript"></script>
		<script src="scriptaculous/src/effects.js" type="text/javascript"></script>
		<script type="text/javascript" src="fabtabulous.js"></script>
		<script type="text/javascript" src="validation.js"></script>
        
        <script type="text/javascript" language="JavaScript" src="table_orderer.js"></script>
            <script type="text/javascript" src="window.js"></script>	
            
            <link href="themes/default.css" rel="stylesheet" type="text/css"/>
                        <link href="themes/alphacube.css" rel="stylesheet" type="text/css"/>
 <!--       <script type="text/javascript" src="tablekit-patched.js" language="javascript"></script>	-->
	
<style media="all" type="text/css">
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <!--[if lt IE 8]>  
 <script src="img/ie/i/IE8.js" type="text/javascript"></script>  
 <![endif]-->
</head>
<body onload="Form.reset('ec');">
<div id="wrap"> 
 	<div id="header_container">
 
          <div id="header_borde_sup">
         </div>
         <div id="header_logo">
          </div>
            <div id="header_titulo">

            </div>

	</div>

<div id="contenido_container">

 <div class="msgStatus" id="status">
        <center>
            <div class="normal">
            	
            </div>
   	    </center>
    <div class="contenido">
    </div>
   </div>



	<div id="grande2" align="justify">
    <fieldset>
    <legend>Iventario Global de Routers</legend>
    
<br/>
<br/>
                
		  <?php 
          	  //inventario de routers
$queryimp = "SELECT * from router,centro_servicio where id_centro=centro_servicio_id_centro";
$result_imp = mysql_query($queryimp, $con);
	  ?>
      
      <fieldset class="cuadro">
      <legend > LISTA DE ROUTERS</legend>
   <form name='borra_router' id='borra_router' method='post'  action="javascript:forms(document.getElementById('borra_router'),'eliminar_cat.php','grande2');" >
  
 <script type="text/javascript" language="JavaScript">
data6 = new Array(
<?php
for($i=0;$i<mysql_num_rows($result_imp);$i++)
{
	$row4 = mysql_fetch_array($result_imp, MYSQL_ASSOC);
?>{
	"Borrar": "<input type='checkbox' name='<?php echo $row4['id_router'];?>' id='<?php echo $row4['id_router'];?>'>",
	"Sucursal": "<?php echo $row4['nombre']?>", 
	"Modelo": "<?php echo $row4['modelo']?>", 
	"Serie": "<?php echo $row4['serie']?>", 
	"Estado": "<?php echo $row4['estado']?>", 
	"Factura": "<?php echo $row4['factura']?>", 
"Editar": "<a href=\"javascript:llamarasincrono2('modificar_cat.php?id=<?php echo $row4['id_router']?>&a=mrou','grande2');\" title=\"Editar\" >Editar</a>"
}
<?php
if ($i<mysql_num_rows($result_imp)-1)
	echo ",";
}
?>
);
  </script>   

    <div id="mostrar4">

    </div>
    <input type="submit" value="Borrar" class="btn"/>

    <script>

  new TableOrderer('mostrar4',{data : data6,filter : 'top',paginate : 'bottom', pageCount:50});  

  </script>
  
          <input type="hidden" name="borrar" id="borrar" value="borrarrouter">
          </form>
             <?php 
		  $r = mysql_query("SELECT count(*) as total FROM router", $con); 
		   echo "TOTAL DE EQUIPOS:".mysql_result($r, 0, "total");
		   ?>
          </fieldset>
            </fieldset>

		
	</div>
  
        <div id="emparejador" style="clear: both;">
        </div>

  </div>
</div> 
 </body>
</html>
<?php
}
?>